import request from '@/utils/request'

// 查询成品发货列表
export function listCpfh(query) {
  return request({
    url: '/warehouse/cpfh/list',
    method: 'get',
    params: query
  })
}

// 查询成品发货详细
export function getCpfh(fhCode) {
  return request({
    url: '/warehouse/cpfh/' + fhCode,
    method: 'get'
  })

}// 查询成品发货详细(添加)
export function getCpfhTj(cpCode) {
  return request({
    url: '/warehouse/cpfh/tj/' + cpCode,
    method: 'get'
  })
}

// 新增成品发货
export function addCpfh(data) {
  return request({
    url: '/warehouse/cpfh',
    method: 'post',
    data: data
  })
}

// 修改成品发货
export function updateCpfh(data) {
  return request({
    url: '/warehouse/cpfh',
    method: 'put',
    data: data
  })
}

// 删除成品发货
export function delCpfh(fhCode) {
  return request({
    url: '/warehouse/cpfh/' + fhCode,
    method: 'delete'
  })
}

// 审核产品发货
export function examine(fhCodes) {
  return request({
    url: '/warehouse/cpfh/examine/' + fhCodes,
    method: 'post'
  })
}
// 撤销产品发货
export function cancel(fhCodes) {
  return request({
    url: '/warehouse/cpfh/cancel/' + fhCodes,
    method: 'post'
  })
}
